package com.tongji.diy.model.furniturePlacementOptimization.assembleComplement
{
	import com.tongji.diy.model.furniturePlacementOptimization.OptimizationParameter;

	//卧具类
	public class Bedding extends SLbase
	{
		public function Bedding(furnitureIndex:int ,furnitureClass:int, aganistWall:Boolean,length:Number = 0, width:Number = 0, height:Number = 0,peopleNum:int = 0,priorList:Vector.<FurnitureBase> = null)
		{
			super(furnitureIndex, furnitureClass, aganistWall,length, width, height, peopleNum, priorList);
			buildAccessibleBox();
		}
		
		override public function set angle(angle:Number):void
		{
			super.angle = angle;
			buildAccessibleBox();
		}
		
		override public function set x(x:Number):void
		{
			super.x = x;
			buildAccessibleBox();
		}
		
		override public function set y(y:Number):void
		{
			super.y = y;
			buildAccessibleBox();
		}
		
		private function buildAccessibleBox():void
		{
			_accessibleBox = buildAccessOBB(x,
				y - (OptimizationParameter.ACCESS_DIS_FOR_BEDDING)/2,
				width + 2 * OptimizationParameter.ACCESS_DIS_FOR_BEDDING,
				length + OptimizationParameter.ACCESS_DIS_FOR_BEDDING); 
		}
	}
}